<template>
	<view class="main">
		<view class="header-nav">
			<!-- <view class="list-item" v-for="(item,index) in listData" :key="index">
				{{item}}
			</view> -->
			<navigator url="/pages/doption/doption">待领养宠物</navigator>
			<navigator url="/pages/doption/doptioned">已送出宠物</navigator>
		</view>
		<Doption :listData="listData"></Doption>
	</view>
</template>

<script lang="ts" setup>
	import Doption from "@/components/doption/doption.vue"
	import ajax from "../../util/request"
	import {reactive} from "vue"
	import {
		onLoad
	} from "@dcloudio/uni-app";
	
	const listData = reactive([])
	onLoad((option)=>{
		ajax("/petsystem/user/apet/apetList",{},'GET').then((res)=>{
		listData.push(...res.data.data)
		})
	})
	
	
</script>

<style scoped scss>
	.main{
		background-color: rgb(172, 162, 225);
		height: 100vh;
	}
	.header-nav {
		display: flex;
		justify-content: space-around;
		font-weight: 800;
		width: 100%;
		height: 60rpx;
		background-color: #eee;
		line-height: 60rpx;
		background-color: rgb(142, 132, 175);
	}
</style>
